﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using WXY.Course.Common;

namespace WXY.Course.Test
{
    [TestClass]
    public class TestForDoc2Swf
    {
        [TestMethod]
        public void Test_PdfToFlash()
        {
            Doc2Swf doc2Swf = new Doc2Swf(pdf2swf: @"C:\Users\Yan\Documents\Visual Studio 2013\Projects\WXY.Course\WXY.Course.Test\bin\Debug\pdf2swf.exe");
            bool result1 = doc2Swf.TransferPdfToFlash(@"C:\Users\Yan\Desktop\FlexPaper_Zine_Trial\pdf\Paper.pdf", @"C:\Users\Yan\Desktop\FlexPaper_Zine_Trial\pdf\Paper.pdf111.swf");
            Assert.IsTrue(result1);

            bool result2= doc2Swf.TransferPdfToFlash(@"C:\Users\Yan\Desktop\FlexPaper_Zine_Trial\pdf\Report.pdf", @"C:\Users\Yan\Desktop\FlexPaper_Zine_Trial\pdf\Report.pdf.swf");
            Assert.IsTrue(result2);
        }

        [TestMethod]
        public void Test_DocToFlash()
        {
            Doc2Swf doc2Swf = new Doc2Swf(pdf2swf: @"C:\Program Files (x86)\SWFTools\pdf2swf.exe");
            bool result1 = doc2Swf.TransferDocToFlash(@"C:\Users\Yan\Desktop\FlexPaper_Zine_Trial\pdf\test.doc", @"C:\Users\Yan\Desktop\FlexPaper_Zine_Trial\pdf\test.doc.swf");
            Assert.IsTrue(result1);

            bool result2 = doc2Swf.TransferDocToFlash(@"C:\Users\Yan\Desktop\FlexPaper_Zine_Trial\pdf\test.xlsx", @"C:\Users\Yan\Desktop\FlexPaper_Zine_Trial\pdf\test.xlsx.swf");
            Assert.IsTrue(result2);

            bool result3 = doc2Swf.TransferDocToFlash(@"C:\Users\Yan\Desktop\FlexPaper_Zine_Trial\pdf\test.pptx", @"C:\Users\Yan\Desktop\FlexPaper_Zine_Trial\pdf\test.pptx.swf");
            Assert.IsTrue(result3);
        }
    }
}
